<?

define ("_OBJECT_SITE_PATH", dirname ($_SESSION["PHP_SELF"]));

set_include_path ($_SERVER["DOCUMENT_ROOT"] . ":" . get_include_path ());
set_include_path ($_SERVER["DOCUMENT_ROOT"] .
		"/:" . get_include_path ());
set_include_path ($_SERVER["DOCUMENT_ROOT"] .
		"/include:" . get_include_path ());
set_include_path ($_SERVER["DOCUMENT_ROOT"] .
		"/admin:" . get_include_path ());
set_include_path ($_SERVER["DOCUMENT_ROOT"] .
		"/admin/include:" . get_include_path ());

require_once ("main.include.inc");

global $_OBJECT_IFACE;
global $_GLOBAL_DBH;
global $_OBJECT_IFACE_DISPLAY;
global $_OBJECT_IFACE_PANEL;

$_OBJECT_IFACE_PANEL = _app_create_iface_panel ();

$_OBJECT_IFACE_DISPLAY->insert_container ($_OBJECT_IFACE_PANEL);

list ($_OITC, $_OIT, $_OITP) = array (
		$_OBJECT_IFACE_TABBING_CONTAINER,
		$_OBJECT_IFACE_TABBING,
		$_OBJECT_IFACE_TABBING_PANEL);

list ($_OBJECT_IFACE_TABBING_CONTAINER, $_OBJECT_IFACE_TABBING,
	$_OBJECT_IFACE_TABBING_PANEL) = _app_create_tabbing_container (array (
		tc_tabbing_id=>"tc_tasks_ctl"
));

$_OBJECT_IFACE_PANEL->insert_container ($_OBJECT_IFACE_TABBING_CONTAINER);
$_OBJECT_IFACE_TABBING_CONTAINER->insert_container ($_OBJECT_IFACE_TABBING);
$_OBJECT_IFACE_TABBING_CONTAINER->insert_container ($_OBJECT_IFACE_TABBING_PANEL);


if (!$_REQUEST["fs_tab"] || $_REQUEST["fs_tab"] == "main") {

	require_once ("fs_objects.inc");
} elseif ($_REQUEST["fs_tab"] == "users") {

	if ($_REQUEST["fs_tab_option"] == "fs_users") {

		require_once ("fs_users.inc");
	} else require_once ("lc_users.inc");
} elseif ($_REQUEST["fs_tab"] == "workgroups") {

	if ($_REQUEST["fs_tab_option"] == "fs_workgroups") {

		require_once ("fs_workgroups.inc");
	} else require_once ("lc_workgroups.inc");
} elseif ($_REQUEST["fs_tab"] == "roles") {

	if ($_REQUEST["fs_tab_option"] == "fs_roles") {

		require_once ("fs_roles.inc");
	} else require_once ("lc_roles.inc");
} elseif ($_REQUEST["fs_tab"] == "modules") {

	if ($_REQUEST["fs_tab_option"] == "fs_modules") {

		require_once ("fs_modules.inc");
	} else require_once ("lc_modules.inc");
}

if (isset($_REQUEST["object_id"]) && ($_REQUEST["object_id"] > 0))

	$_OBJECT_TABBING = _app_create_tabbing_object ( array (

	fs_tab_id => "fs_tab",
	fs_tab_key => "object_id",
	fs_tab_value => $_REQUEST["object_id"],
	fs_tab_default => "main",
	fs_tab_hide_one => true,
	fs_tabs => array (
		array (label=>"Object", fs_tab=>"main", wrapper=>"css_tab_object",
				options=>"fs_action=view"),
		array (label=>"Users", fs_tab=>"users", wrapper=>"css_tab_people",
				options=>"fs_action=view"),
		array (label=>"Workgroups", fs_tab=>"workgroups", wrapper=>"css_tab_workgroup",
				options=>"fs_action=view"),
		array (label=>"Roles", fs_tab=>"roles", wrapper=>"css_tab_role",
				options=>"fs_action=view"),
		array (label=>"Modules", fs_tab=>"modules", wrapper=>"css_tab_module",
				options=>"fs_action=view"),
	),
));

$_OBJECT_IFACE_TABBING->insert_container ($_OBJECT_TABBING);
$_OBJECT_IFACE->show_container ();

?>
